<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		div{
			width: 200px;
			height: 200px;
			background: pink;
			position: absolute;
		}
		/*z-index: 必须搭配定物流 不能脱离position， 谁的z-index大，谁在上面显示		*/
		.box1{
			top: 100px;
			background: skyblue;
			z-index:9999 ;
		}
		.box2{
			left: 50px;
			z-index: 999;
		}
		.box3{
			background: green;
			z-index: -10;
		}
	</style>
</head>
<body>
      <div class="box1"></div>
      <div class="box2"></div>
      <div class="box3"></div>

</body>
</html>